import axios from "axios"
import service from '../src/utils/request'

export function tuan_list(paload = {}) {
    return service.get('/api/tuan/list', { params: paload })
}

export function shop_list(paload = {}) {
    return service.get('/api/shop/list', { params: paload })
}
// 轮播图
export function banner_list(paload = {}) {
    return service.get('/api/banner/list', { params: paload })
}
// 注册
export function user_register(paload = {}) {
    return service.post('/api/user/register', paload)
}
// 登录
export function user_login(paload = {}) {
    return service.post('/api/user/login', paload)
}

// 店铺详情
export function shop_shopinfo(paload = {}) {
    return service.get('/api/shop/shopinfo', { params: paload })
}

// 搜索店铺
export function shop_search(paload = {}) {
    return service.get('/api/shop/search', { params: paload })
}

// 收藏店铺
export function shop_fav(paload = {}) {
    return service.post('/api/shop/fav', paload)
}

// 获取收藏列表
export function shop_favlist(paload = {}) {
    return service.get('/api/shop/favlist', { params: paload })
}
// 购物车数量加1
export function shopcart_add(paload = {}) {
    return service.post('/api/shopcart/add', paload)
}
// 购物车数量减1
export function shopcart_sub(paload = {}) {
    return service.post('/api/shopcart/sub', paload)
}
// 购物车清空
export function shopcart_clear(paload = {}) {
    return service.post('/api/shopcart/clear', paload)
}
// 获取购物车列表
export function shopcart_list(paload = {}) {
    return service.get('/api/shopcart/list', { params: paload })
}
// 新增地址
export function address_add(paload = {}) {
    return service.post('/api/address/add', paload)
}
// 获取地址列表
export function address_list(paload = {}) {
    return service.get('/api/address/list', { params: paload })
}
// 编辑地址
export function address_edit(paload = {}) {
    return service.post('/api/address/edit', paload)
}
// 删除地址
export function address_del(paload = {}) {
    return service.post('/api/address/del', paload)
}